--WindowFx DLL v1.0--

WindowFx allow you to add a dialog or a @window inside mIRC's channels/queries/custom/status windows. For better effects, it also allow you to set a padding between the titlebar and the text window (and nicklist on chans). You can also use common window styles for the windows.

The dialog/@win can be put anywhere inside the parent window, but the padding is only for the top of the window, so you will mostly put your childs on the top (inside the space made with the dll).

With WindowFx you can make (just some possible examples) :

channels toolbar (ops control etc in icons) - your own titlebars - info system in queries (display a picture) - display info about the chan/server etc., and since you can create anything that can be done with dialogs or window and put it in a chan.

The functions are :

SetPadding - SetChild - SetStyle - DllInfo

Here is the description of what they do/provide (in the example i'll assume that WindowFx.dll is in your mIRC main directory) :

 

SetPadding

Usage : /dll WindowFX.dll SetPadding Window_name > [height] [text | list]

This will add a padding of height pixels on to you window. This can only be done dor the top (not to the sides or bottom). You can specify one of these two options if you want :

• list : The padding will only apply to the nicklist (only for channels and window with a listbox)

• text : The padding will only apply to the text window, not on the listbox (only for channels and window with a listbox)

If you don't specify an option, the padding will apply on both.

The padding must be at least 0 (no negative number).

Example :

/dll WindowFx.dll SetPadding #MyChannel > 50 text

or

/dll WindowFx.dll SetPadding status window > 20

 

SetChild

Usage : /dll WindowFX.dll SetChild Parent_Window_name > child_name

Add a dialog or a custom @win inside a window. You can only add one child per win.

For best effects, you should use 0 0 for the x y coords of the dialog/@win, and the height should be the padding. With this way, the child will not overlap on the window's text.

You do not need to set a padding before, but then the child will be placed above the window...

Once a child is added to the win, you will be able to get 2 signals inside mIRC :

WFx_Size :

The parent window has been resized (usefull to update the dialog/window size dynamically).

Parameters : $1 : parent name - $2 : child name - $3 : new width - $4 : new_height .

Example :

ON *:SIGNAL:WFx_Size: {

echo -a $signal : $1-

}

will echo this when you resize the #genscripts channel with the @test window added with SetChild :

WFx_Size : #genscripts @test 823 438

WFx_Mouse :

The mouse has been moved on the child window (since its always inactive, mIRC ONMOUSE doesn't work)

Parameters : $1 : window name - $2 : x position - $3 : y position .

use it with ON *:SIGNAL:WFx_Mouse:

 

SetStyle

Usage : /dll WindowFx.dll SetStyle Config_dialog > [style1 |style2 |... ]

Allow you to change some styles of a window. It works for dialogs and windows (custom/channels/queries/status etc). Note that if you had a padding and a child AFTER setting a style, mIRC could crash. So add styles only after the padding + child, or don't add childs.

• notitle : remove the titlebar of a window

• title : put the titlebar back

• tool : the window becomes a tool window

• clientedge : the window has bigger borders

• staticedge : the window has sunken borders

Example :

/dll WindowFx.dll SetStyle #home_sweet_home > tool clientedge

 

DllInfo

Return some info about the dll.

Example :

//echo -a $dll(WindowFx.dll,DllInfo,.)

 

____________________________________

 

Know issues :

Resizing a window with a padding will "flash" a little, especially if the window has padding over the listbox... thats because of mIRC trying to resize his childs.

• The option of mIRC in the "General" section : "Right click in listbox selects line" will not work correctly if you right click on listbox if there is a padding on this listbox, so uncheck this if it's turned on.

• Sometimes, if you add a style with SetStyle then if you add a padding + a child, mIRC will crash... I don't know why.

• If you find any bugs, please contact me with a description of it, how to get it, and your OS version.

 

Greetings :

Thx to Naru and Necroman's tutorial for introducing me into the world of dlls.

And thanks to all my beta testers (especially [-maverick-] and obob)

 

Epsilon blizzard@be.tf

September 2002